package com.label.Model.Query;

import com.label.Model.Common.Validation.Save;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Null;
import javax.validation.constraints.Pattern;

@Data
public class TagQuery {

    @Null(message = "ID应为空！",groups = Save.class)
    private Long id;

    @NotBlank(message = "名字不为空！",groups = Save.class)
    @Pattern(message="只能为汉字，字母，或数字",regexp = "[\u4e00-\u9fa5_a-zA-Z0-9]+$")
    private String name;

    private Integer type;

}
